home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’93
/
HackTV & Example panel comp.
/
ExampleVideoPanelPrivate.h
< prev
next >
Wrap
Text File
|
1993-08-18
|
4KB
|
176 lines
/*
File: ExampleVideoPanelPrivate.h
Contains: Private header file for example video panel component routines.
Written by: Gary Woodcock
Refer to develop Issue 14, "Video Digitizing Under QuickTime",
for details on this code.
Copyright: © 1992-1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
*/
//-----------------------------------------------------------------------
// Includes
#ifndef _EXAMPLEVIDEOPANELPRIVATE_
#define _EXAMPLEVIDEOPANELPRIVATE_
#include <QuickTimeComponents.h>
#include "DebugFlags.h"
//-----------------------------------------------------------------------
// Private constants
// Base resource ID
enum
{
kBaseResID = 500
};
// Maximum number of instances that can be opened
enum
{
kMaxExampleVideoPanelInstances = 1
};
// Component and interface revision levels
enum
{
exampleVideoPanelInterfaceRevision = 0x00010001
};
enum
{
kGenericError = -1L // Handy return code
};
// DITL ID
enum
{
kExampleVideoPanelDITLID = kBaseResID
};
// DITL items
enum
{
kZeroBlackButton = 1,
kResetButton,
kSeparator,
kTextBlurb
};
enum
{
kDKey = 0x02,
kRKey = 0x0F
};
//-----------------------------------------------------------------------
// Private types
typedef struct PanelGlobals
{
Component self;
SeqGrabComponent seqGrabber;
SGChannel videoChannel;
short resRefNum;
Pattern grayPat;
unsigned short savedBlackLevel;
}
PanelGlobals, *PanelGlobalsPtr, **PanelGlobalsHdl;
//-----------------------------------------------------------------------
// Private prototypes
#ifdef DEBUG_ME
// Only need this prototype if we're running linked (for debugging)
pascal ComponentResult
ExampleVideoPanelDispatcher (ComponentParameters *params, Handle storage);
#endif DEBUG_ME
pascal ComponentResult
_ExampleVideoPanelOpen (Handle storage, ComponentInstance self);
pascal ComponentResult
_ExampleVideoPanelClose (Handle storage, ComponentInstance self);
pascal ComponentResult
_ExampleVideoPanelCanDo (short selector);
pascal ComponentResult
_ExampleVideoPanelVersion (void);
pascal ComponentResult
_ExampleVideoPanelGetDitl (Handle storage, Handle *ditl);
pascal ComponentResult
_ExampleVideoPanelGetTitle (Handle storage, Str255 title);
pascal ComponentResult
_ExampleVideoPanelCanRun (Handle storage, SGChannel c);
pascal ComponentResult
_ExampleVideoPanelInstall (Handle storage, SGChannel c, DialogPtr d, short itemOffset);
pascal ComponentResult
_ExampleVideoPanelEvent (Handle storage, SGChannel c, DialogPtr d, short itemOffset,
EventRecord *theEvent, short *itemHit, Boolean *handled);
pascal ComponentResult
_ExampleVideoPanelItem (Handle storage, SGChannel c, DialogPtr d, short itemOffset, short itemNum);
pascal ComponentResult
_ExampleVideoPanelRemove (Handle storage, SGChannel c, DialogPtr d, short itemOffset);
pascal ComponentResult
_ExampleVideoPanelSetGrabber (Handle storage, SeqGrabComponent sg);
pascal ComponentResult
_ExampleVideoPanelSetResFile (Handle storage, short resRef);
pascal ComponentResult
_ExampleVideoPanelGetSettings (Handle storage, SGChannel c, UserData *ud, long flags);
pascal ComponentResult
_ExampleVideoPanelSetSettings (Handle storage, SGChannel c, UserData ud, long flags);
pascal ComponentResult
_ExampleVideoPanelValidateInput (Handle storage, Boolean *ok);
static OSErr
FakeButtonHit (ControlHandle theButton);
static OSErr
FakeDialogButtonHit (DialogPtr theDialog, short theButtonItem);
static void
SetUserItem (DialogPtr theDialog, short theItem, Handle userProc);
static Handle
GetItemHandle (DialogPtr theDialog, short theItem);
static void
GetItemBox (DialogPtr theDialog, short theItem, Rect *theRect);
#ifdef THINK_C
#ifdef DEBUG_ME
Component
RegisterExampleVideoPanel (void);
#endif DEBUG_ME
#endif THINK_C
//-----------------------------------------------------------------------
#endif _EXAMPLEVIDEOPANELPRIVATE_
//-----------------------------------------------------------------------